from tensorboardX import SummaryWriter
import numpy as np
writer=SummaryWriter()
import random

average_loss=[]
for epoch in range(500):
    if 100>=epoch>50:
        x=0.05
    elif 150>=epoch>100:
        x=0.1
    elif 200>=epoch>150:
        x=0.15
    elif epoch>200:
        x=0.2
    else:
        x=0
    average_loss.append(random.uniform(0.691,0.694))
    predict_acc=random.uniform(0.499+x,0.51+x)


    writer.add_scalar('scalar/loss', np.mean(average_loss), epoch)
    writer.add_scalar('scalar/acc', predict_acc, epoch)